package com.zenghus.single.Seriable;

import java.io.*;

public class SeriableTest {
    public static void main(String[] args) {
        Seriable s=Seriable.getInstance();
        try {

            ObjectOutputStream oo=new ObjectOutputStream(new FileOutputStream(new File("E:/Seriable.txt")));
            oo.writeObject(s);
            oo.close();

            ObjectInputStream io=new ObjectInputStream(new FileInputStream(new File("E://Seriable.txt")));
            Seriable os= (Seriable) io.readObject();
            io.close();

            System.out.println(s);
            System.out.println(os);


        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
